list_df4plot = df_geo_abiotics %>% bind_cols(
mat_cluster_membership_label
) %>%
tidyr::pivot_longer(cols = c(
#pam_a0,pam_a0.05,pam_a0.10,pam_a0.20,
hclust_a0,hclust_a0.05,hclust_a0.10,hclust_a0.20)
) %>%
mutate(Cluster=as.factor(value),
method=factor(name,levels=c(
#'pam_a0','pam_a0.05','pam_a0.10','pam_a0.20',
'hclust_a0','hclust_a0.05','hclust_a0.10','hclust_a0.20'))) %>%
group_split(method) #%>%
list_df4plot %>% purrr::map(
~ggplot(., aes(x=Latitude,y=Depth, label = Cluster,fill=Cluster)) +
geom_label(size = 3,alpha=0.5) +
theme_minimal()+
scale_y_reverse() +
# scale_colour_gradient2(
# low = "deepskyblue",
# mid = "gray",
# high = "orange",
# na.value = 'red',
# midpoint = median(.$value,na.rm=T)
# )+
ggtitle(unique(.$method))+
theme(legend.position = '')
#facet_wrap(~ AbioticFactor, labeller = function(x) label_value(x, multi_line = FALSE))
) %>%
cowplot::plot_grid(plotlist = ., ncol = 4)